import static org.junit.Assert.*;

import org.junit.Test;

public class AuctionactionTest {


    @Test
    public void Test() {
            
    Auctionaction.Bfoldaction();    
            
    assertTrue(Auctionaction.Bfoldaction());
           
           
    }
    
    @Test
    public void Test1(){
    	
    	
    int mygold = 100;
	Auctionaction.Ballin(mygold);	
    	
	assertTrue(Auctionaction.Ballin(100));	 //mygold>0
	
	assertFalse(Auctionaction.Ballin(-100)); //mygold<0	
    	
    }

    
    @Test
    public void Test2(){
    	int maxgolden=0, mygoldingame=0, mygold=0;
    	Auctionaction.Bcallaction(maxgolden, mygoldingame, mygold);
    	
    	assertTrue(Auctionaction.Bcallaction(100,50,200));	 //var>0 $$ mygold-var>0
    	assertTrue(Auctionaction.Bcallaction(100,50,50));	 //var>0 $$ mygold-var=0
    	
    	assertFalse(Auctionaction.Bcallaction(100,200,15));  //var<0 && mygold-var>0
    	assertFalse(Auctionaction.Bcallaction(100,50,15));   //var>0 && mygold-var<0 
    
    
    }


    @Test
    public void Test3(){
    	int maxgolden=0, mygoldingame=0, mygold=0,howgold=0;
    	Auctionaction.Braiseaction(maxgolden, mygoldingame, howgold, mygold);
    	
    	
    	assertTrue(Auctionaction.Braiseaction(100,50,200,300)); // var<howgold $$ hawgold<mygold && var>0
    	assertTrue(Auctionaction.Braiseaction(100,50,50,300));  // var=howgold $$ howgold<mygold $$ var>0
    	assertTrue(Auctionaction.Braiseaction(100,50,50,50));   // var=howgold && howgold=mygold && var>0
    	assertTrue(Auctionaction.Braiseaction(100,50,70,70));   // var<howgold && howgold=mygold && var>0
    
    	assertFalse(Auctionaction.Braiseaction(50,100,70,80));       // howgold>var && howgold<mygold && var<0
    	assertFalse(Auctionaction.Braiseaction(100,200,-100,80));    // howgold=var && howgold<mygold && var<0
    	assertFalse(Auctionaction.Braiseaction(100,200,-100,-100));  // howgold=var && howgold=mygold && var<0
    	assertFalse(Auctionaction.Braiseaction(100,200,70,70));      // howgold>var && howgold=mygold && var<0
    	
    	assertFalse(Auctionaction.Braiseaction(100,50,20,70));      // howgold<var && howgold<mygold && var>0
    	assertFalse(Auctionaction.Braiseaction(100,50,20,70));      // howgold<var && howgold=mygold && var>0
    	assertFalse(Auctionaction.Braiseaction(100,50,70,30));      // howgold>var && howgold>mygold && var>0
    	assertFalse(Auctionaction.Braiseaction(100,50,50,30));      // howgold=var && howgold>mygold && var>0
    	
    }


@Test
public void Test4(){
	
	int maxgolden=0, mygoldingame=0, mygold=0,howgold=0, mytimeingame=0;
	String oldaction="Check";
	Boolean longround=false;
	Auctionaction.Bbetaction(mytimeingame,longround , oldaction,maxgolden, mygoldingame, howgold, mygold);
	
	assertFalse(Auctionaction.Bbetaction(1,false,"",400,200,150,200)); // var>howgold $$ hawgold<mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,false,"",400,200,100,100)); // var>howgold $$ hawgold=mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,false,"",300,200,100,50)); // var=howgold $$ hawgold>mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,false,"",300,200,400,100)); // var<howgold $$ hawgold>mygold && var>0
	
	assertTrue(Auctionaction.Bbetaction(2,false,"Check",300,200,150,200)); // var<howgold $$ hawgold<mygold && var>0
	assertTrue(Auctionaction.Bbetaction(2,false,"Check",300,200,150,150)); // var<howgold $$ hawgold=mygold && var>0
	assertTrue(Auctionaction.Bbetaction(2,false,"Check",300,200,100,200)); // var=howgold $$ hawgold<mygold && var>0
	assertTrue(Auctionaction.Bbetaction(2,false,"Check",300,200,100,100)); // var=howgold $$ hawgold=mygold && var>0
	
	assertFalse(Auctionaction.Bbetaction(2,false,"Allin",300,200,150,200)); // var<howgold $$ hawgold<mygold && var>0
	assertFalse(Auctionaction.Bbetaction(2,false,"Allin",300,200,150,150)); // var<howgold $$ hawgold=mygold && var>0
	assertFalse(Auctionaction.Bbetaction(2,false,"Allin",300,200,100,200)); // var=howgold $$ hawgold<mygold && var>0
	assertFalse(Auctionaction.Bbetaction(2,false,"Allin",300,200,100,100)); // var=howgold $$ hawgold=mygold && var>0

	assertFalse(Auctionaction.Bbetaction(1,true,"",300,200,150,200)); // var<howgold $$ hawgold<mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,true,"",300,200,150,150)); // var<howgold $$ hawgold=mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,true,"",300,200,100,200)); // var=howgold $$ hawgold<mygold && var>0
	assertFalse(Auctionaction.Bbetaction(1,true,"",300,200,100,100)); // var=howgold $$ hawgold=mygold && var>0

	
}

@Test
public void Test5(){
	
	int mygold=0,maxgolden=0,mytimeingame=1;
	String mycondition=null, oldaction=null;
	Boolean longround=false;
	
	Auctionaction.Bcheckaction(mygold,maxgolden,mytimeingame,longround,oldaction,mycondition);
	
	assertTrue(Auctionaction.Bcheckaction(0,0,1,false,"",""));
	assertFalse(Auctionaction.Bcheckaction(0,0,1,true,"",""));


	assertTrue(Auctionaction.Bcheckaction(0,0,2,false,"Check",""));
	assertFalse(Auctionaction.Bcheckaction(0,0,2,false,"Allin","")); 

	assertTrue(Auctionaction.Bcheckaction(50,50,2,false,"Check","Du¿¹ ciemn¹ da³"));
	assertTrue(Auctionaction.Bcheckaction(25,50,2,false,"Check","Du¿¹ ciemn¹ da³"));
	assertFalse(Auctionaction.Bcheckaction(20,50,2,false,"Allin","Du¿¹ ciemn¹ da³"));
	assertFalse(Auctionaction.Bcheckaction(50,50,2,false,"Allin","da³"));
}



}
